<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
        <meta charset="utf-8">
        <title>菜单列表</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="renderer" content="webkit">

        <link rel="shortcut icon" href="assets/img/favicon.ico" />
        <!-- Loading Bootstrap -->
        <link href="/admin/assets/css/backend.min.css" rel="stylesheet">

        <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
        <!--[if lt IE 9]>
          <script src="assets/js/html5shiv.js"></script>
          <script src="assets/js/respond.min.js"></script>
        <![endif]-->
        <script type="text/javascript">
            var require = {
                "config": {
                    "site": {
                        "name": "FastAdmin",
                        "cdnurl": "",
                        "version": "1.0.0",
                        "timezone": "Asia/Shanghai",
                        "languages": {
                            "backend": "zh-cn",
                            "frontend": "zh-cn"
                        }
                    },
                    "modulename": "admin",
                    "controllername": "tabletemplate",
                    "actionname": "index",
                    "jsname": "../js/functionMenu/rule.js",
                    "moduleurl": "./",
                    "language": "zh-cn",
                    "referer": null
                }
            };
        </script>
    </head>

    <body class="inside-header inside-aside is-dialog">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    控制台                                    <small>Control panel</small>
                                </h1>
                            </section>
                            <div class="content">
                                <form id="edit-form" class="form-horizontal form-ajax" role="form" method="POST" action="/admin/functionMenu/save">
                                    <div class="form-group">
                                        <label for="c-menu" class="control-label col-xs-12 col-sm-2">创建菜单:</label>
                                        <div class="col-xs-12 col-sm-8">
	                                         <select  id="c-menu" class="form-control selectpicker" name="onemenu">
	                                                <option value="1" selected>一级菜单</option>
	                                                <option value="0" >二级菜单</option>
	                                            </select>
                                         </div>
                                    </div>
                                    <div id="allonemenu" class="form-group" style="display:none;">
                                        <label for="onemenu" class="control-label col-xs-12 col-sm-2">所属一级菜单:</label>
                                        <div class="col-xs-12 col-sm-8">
	                                         <select  id="onemenu" class="form-control selectpicker" name="pid">
	                                         		<option value="0">一级菜单</option>
	                                                <option th:value="${oneMenu.id}" th:each="oneMenu: ${oneMenus}" th:text="${oneMenu.title}"></option> 
	                                            </select>
                                         </div>
                                    </div>
                                    
                                    <div class="form-group">
                                        <label for="title" class="control-label col-xs-12 col-sm-2">标题:</label>
                                        <div class="col-xs-12 col-sm-8">
                                            <input type="text" class="form-control" id="title" name="title" data-rule="required" />
                                        </div>
                                    </div>
                                    
                                    <div class="form-group">
                                        <label for="name" class="control-label col-xs-12 col-sm-2">访问URL:</label>
                                        <div class="col-xs-12 col-sm-8">
                                            <input type="text" class="form-control" id="name" name="url" data-rule="required" />
                                        </div>
                                    </div>
                                    
                                    <div class="form-group">
                                        <label for="icon" class="control-label col-xs-12 col-sm-2">图标:</label>
                                        <div class="col-xs-12 col-sm-8">
                                            <div class="input-group input-groupp-md">
                                                <input type="text" class="form-control" id="icon" name="icon" value="fa fa-dashboard" data-rule="required"/>
                                                <a href="javascript:;" class="btn-search-icon input-group-addon">搜索图标</a>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="weight" class="control-label col-xs-12 col-sm-2">权重:</label>
                                        <div class="col-xs-12 col-sm-8">
                                            <input type="text" class="form-control" id="weight" name="weight" data-rule="required;digits" />
                                        </div>
                                    </div>
                                    <div class="form-group hidden layer-footer">
                                        <div class="col-xs-2"></div>
                                        <div class="col-xs-12 col-sm-8">
                                            <button type="submit" class="btn btn-success btn-embossed disabled">确定</button>
                                            <button type="reset" class="btn btn-default btn-embossed">重置</button>
                                        </div>
                                    </div>
                                </form>
                                <style>
                                    #chooseicon {
                                        margin:10px;
                                    }
                                    #chooseicon ul {
                                        margin:5px 0 0 0;
                                    }
                                    #chooseicon ul li{
                                        width:30px;height:30px;
                                        line-height:30px;
                                        border:1px solid #ddd;
                                        padding:1px;
                                        margin:1px;
                                        text-align: center;
                                    }
                                    #chooseicon ul li:hover{
                                        border:1px solid #2c3e50;
                                        cursor:pointer;
                                    }
                                </style>
                                <script id="chooseicontpl" type="text/html">
                                    <div id="chooseicon">
                                        <div>
                                            <form onsubmit="return false;">
                                                <div class="input-group input-groupp-md">
                                                    <div class="input-group-addon">搜索图标</div>
                                                    <input class="js-icon-search form-control" type="text" placeholder="">
                                                </div>
                                            </form>
                                        </div>
                                        <div>
                                            <ul class="list-inline">
                                                <% for(var i=0; i<iconlist.length; i++){ %>
                                                    <li data-font="<%=iconlist[i]%>" title="<%=iconlist[i]%>">
                                                        <i class="fa fa-<%=iconlist[i]%>"></i>
                                                    </li>
                                                    <% } %>
                                            </ul>
                                        </div>

                                    </div>
                                    </script>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <script src="/admin/assets/js/require.min.js" data-main="/admin/assets/js/require-backend.min.js"></script>
        </body>
    </html>